package com.ruoyi.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.SceneryareaDto;
import com.ruoyi.service.IWechartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/applet/sceneryarea")
public class WechartController extends BaseController {

    @Autowired
    IWechartService wechartService;

    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo getSceneryareaList(@RequestBody SceneryareaDto sceneryarea) {

        //120.011272,30.298565
        //良睦路（地铁站）120.013621,30.291958

        List<SceneryareaDto> sceneryareaList = wechartService.getSceneryareaList(sceneryarea);
        return getDataTable(sceneryareaList);
    }
}
